package domain

import (
	"context"

	"google.golang.org/protobuf/encoding/protojson"
)

type UserAuthUsecase interface {
	Login(ctx context.Context, mobile string, password string, appId int32) (*UserAuth, error)
	Logout(ctx context.Context, id int32, appId int32) error
	CheckLogin(ctx context.Context, token string, appId int32) (*UserAuth, error)
}

func (x *UserAuth) MarshalBinary() (data []byte, err error) {
	return protojson.Marshal(x)
}
func (x *UserAuth) UnmarshalBinary(data []byte) error {
	return protojson.Unmarshal(data, x)
}
